import dayjs from 'dayjs'

export const knowledgeFileColumn = [
    {
        label: '类型',
        prop: 'type',
        width: 100,
    },
    {
        label: '文件名',
        prop: 'filename',
        search: true,
    },
    {
        label: '地址',
        prop: 'url',
    },
    {
        label: '状态',
        prop: 'status',
        dicData: [
            { label: '待向量化', value: 'WaitEmbedding' },
            { label: '向量化中', value: 'Embedding' },
            { label: '已完成', value: 'Embedded' },
        ],
        width: 80,
    },
    {
        label: '切片数量',
        prop: 'docCount',
        bind: 'metaData.docCount',
        width: 80,
    },
    {
        label: '上传时间',
        prop: 'uploadTime',
        bind: 'uploadTime',
        type: 'datetime',
        formatter: (_row, val) => {
            return val ? dayjs(val).format('YYYY-MM-DD HH:mm:ss') : ''
        },
        span: 9,
        value: dayjs().format('YYYY-MM-DD HH:mm:ss'),
    },
]
